// @ts-ignore

 
import { api } from '@/utils/api';

/** 新增原水数据 POST /proDataRaw/add */
export async function proDataRawAdd(
  body: BIZAPI.ProDataRawCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataRawAdd(
  body: BIZAPI.ProDataRawCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataRawAdd(
  body: BIZAPI.ProDataRawCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataRawAdd(
  body: BIZAPI.ProDataRawCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataRaw/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataRaw/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 删除原水数据 POST /proDataRaw/delete */
export async function proDataRawDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataRawDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataRawDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataRawDelete(body: BIZAPI.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataRaw/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataRaw/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 下载模板 POST /proDataRaw/download/template */
export async function proDataRawDownloadTemplate(
  options?: ArgumentsType<typeof api>[1]
): Promise<any>;

export async function proDataRawDownloadTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<any>>;

export async function proDataRawDownloadTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<any>;

export async function proDataRawDownloadTemplate(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<any>(`/app/proDataRaw/download/template`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<any>(`/app/proDataRaw/download/template`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 获取原水数据数据 POST /proDataRaw/get */
export async function proDataRawGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultProDataRawEntity>;

export async function proDataRawGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultProDataRawEntity>>;

export async function proDataRawGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultProDataRawEntity>;

export async function proDataRawGet(body: BIZAPI.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultProDataRawEntity>(`/app/proDataRaw/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultProDataRawEntity>(`/app/proDataRaw/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 导入数据 POST /proDataRaw/import */
export async function proDataRawImport(
  body: {},
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function proDataRawImport(
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function proDataRawImport(
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function proDataRawImport(body: {}, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/proDataRaw/import`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/proDataRaw/import`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取原水数据分页数据 POST /proDataRaw/page */
export async function proDataRawPage(
  body: BIZAPI.ProDataRawQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageProDataRawEntity>;

export async function proDataRawPage(
  body: BIZAPI.ProDataRawQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageProDataRawEntity>>;

export async function proDataRawPage(
  body: BIZAPI.ProDataRawQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageProDataRawEntity>;

export async function proDataRawPage(
  body: BIZAPI.ProDataRawQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageProDataRawEntity>(`/app/proDataRaw/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageProDataRawEntity>(`/app/proDataRaw/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 更新原水数据 POST /proDataRaw/update */
export async function proDataRawUpdate(
  body: BIZAPI.ProDataRawUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataRawUpdate(
  body: BIZAPI.ProDataRawUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataRawUpdate(
  body: BIZAPI.ProDataRawUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataRawUpdate(
  body: BIZAPI.ProDataRawUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataRaw/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataRaw/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
